Optimization-Based Legged Odometry And Sensor Fusion For Legged Robot Continuous Localization